`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company: 
// Engineer: 
// 
// Create Date: 2025/06/23 18:03:21
// Design Name: 
// Module Name: decoder_display
// Project Name: 
// Target Devices: 
// Tool Versions: 
// Description: 
// 
// Dependencies: 
// 
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
// 
//////////////////////////////////////////////////////////////////////////////////


module decoder_3to8_with_display (
    input [2:0] A,        
    output reg [7:0] Y,   
    output reg [2:0] seg  
);

    always @(*) 
    begin
 
        case(A)
            3'b000: Y = 8'b00000001;  
            3'b001: Y = 8'b00000010;  
            3'b010: Y = 8'b00000100; 
            3'b011: Y = 8'b00001000;  
            3'b100: Y = 8'b00010000;  
            3'b101: Y = 8'b00100000;  
            3'b110: Y = 8'b01000000;  
            3'b111: Y = 8'b10000000;  
            default: Y = 8'b00000000; 
        endcase

       
        seg = A[2:0];  
    end

endmodule
